package com.jrx.anytxn.reporting.job.customer.step;

import com.jrx.anytxn.common.exception.TxnBizException;
import com.jrx.anytxn.customer.entity.CmCustomerSecondLevel;
import com.jrx.anytxn.reporting.bean.CustomerDataBean;
import com.jrx.anytxn.reporting.service.ICustomerDataDealService;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author ：lihm
 * @date ：2019/11/27 9:17
 */
@Service
public class AutoAssemCustomerProcessor implements ItemProcessor<CmCustomerSecondLevel, CustomerDataBean> {

    @Autowired
    private ICustomerDataDealService customerDataDealService;

    @Override
    public CustomerDataBean process(CmCustomerSecondLevel item) throws TxnBizException {
        CustomerDataBean customerDataBean = customerDataDealService.assemCustomerData(item);
        return customerDataBean;
    }
}
